﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TracNghiemV1.Database;
using TracNghiemV1.DAO;


namespace TracNghiemV1.BUS
{
    class SysUserBus
    {
        public static SYSUSER FindSysUserWithUserIdAndPass(string userId, string password)
        {
            return SysUserDao.FindSysUserWithUserIdAndPass(userId, password);
        }

        public static SYSUSER FindSysUserWithUserId(string userId)
        {
            return SysUserDao.FindSysUserWithUserId(userId);
        }

        public static IList<SYSUSER> FindSysUserListWithName(string name)
        {
            return SysUserDao.FindSysUserListWithName(name);
        }

        public static int GetNumberOfTotalUser()
        {
            return SysUserDao.GetNumberOfTotalUser();
        }

        public static void AddSysUser(SYSUSER newUser)
        {
            SysUserDao.AddSysUser(newUser);
        }

        public static void ModifySysUser(SYSUSER modifiedUser)
        {
            SysUserDao.ModifySysUser(modifiedUser);
        }

        public static void DeleteSysUser(string userId)
        {
            SysUserDao.DeleteSysUser(userId);
        }

        public static SYSUSER GetLatestUser()
        {
            return SysUserDao.GetLatestUser();
        }
    }
}
